//日志消息类，进行日志中间信息的存储
#pragma once
#include <iostream>
#include <string>
#include <thread>
#include "level.hpp"
#include "util.hpp"
namespace bitlog{
    class LogMsg{
        public:
        LogMsg( LogLevel::value level,size_t line,
        const std::string file,const std::string logger,const std::string msg)
        :_ctime(util::Date::now())
        ,_level(level)
        ,_line(line)
        ,_tid(std::this_thread::get_id())
        ,_file(file)
        ,_logger(logger)
        ,_payload(msg)
        {
        }
        size_t _ctime;//日志产生时间
        LogLevel::value _level;//日志等级
        size_t _line;//行号
        std::string _file;//源码文件名
        std::thread::id _tid;//线程id
        std::string _logger;//日志器名称
        std::string _payload;//有效消息数据

    };
}